if (global.control == 1)
{
    switch (emitter_type)
    {
        case 0:
        //Creates an object when the scene starts
        if (emitter_lastinstance == -1)
        {
            emitter_lastinstance = instance_create(x,y,emitter_parameter[0]);
        }
        break;
        case 1:
        //Creates an object when the emitter is on screen
        if on_screen(0)
        {
            if (emitter_lastinstance == -1)
            {
                emitter_lastinstance = instance_create(x,y,emitter_parameter[0]);
            }
        }
        else
        {
            emitter_lastinstance = -1;
        }
        break;
        case 2:
        //Creates an object just once
        if (trigger_get(emitter_paramenter[1]) != true)
        {
            emitter_lastinstance = instance_create(x,y,emitter_parameter[0]);
            trigger_set(emitter_parameter[1],true);
        }
        break;
        case 3:
        //Creates an object after a certain amount of steps
        switch (emitter_counter)
        {
            case -1:
            emitter_counter = emitter_parameter[1];
            break;
            case 0:
            emitter_lastinstance = instance_create(x,y,emitter_parameter[0]);
            break;
        }
        emitter_counter -= 1;
        break;
    }
}
